<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='../vue.js'></script>
</head>

<body>
    <div id='app'>
        <mynav></mynav>
    </div>
</body>
<script>
    const app = Vue.createApp({
        data() {
            return {}
        },
        methods: {},
        // 局部组件定义
        components:{}
    })
    // 定义一个全局组件，mynav组件名称，{组件选项}
    app.component('mynav', {
        template: "<h1>{{message}}</h1>",
        data() {
            return {
                message: "hello vue"
            }
        },
         methods: {}
    })
    // mvvm,m是数据模型指的是data，v是视图指app模板，vm是视图数据桥梁
    // v-model:数据变化视图更新，视图变化数据更新
    const vm = app.mount('#app')
</script>

</html>